#pragma once

#include "Logging.h"
#include <GetPot>
#include <memory>
#include <string>
#include <vector>

class CommandLine
{
public:
  CommandLine(int argc, char* argv[])
  {
    for (size_t i = 0; i < argc; i++)
    {
      _args.push_back(argv[i]);
    }
    _cl = std::make_shared<GetPot>(argc, argv);
  }

  ~CommandLine(){}

  void PrintUsage()
  {
    std::string usage = R"(
Usage: zaran -i <input.i>
    )";
    std::cout << usage;
  }

  std::string Follow(const char* option) { return _cl->follow("", option); }
  GetPot& Get() { return *_cl; }
  int Argc() { return _args.size(); }

private:
  std::shared_ptr<GetPot> _cl;
  std::vector<std::string> _args;
};

//CommandLine::CommandLine(int argc, char* argv[])
//{
//  for (size_t i = 0; i < argc; i++)
//  {
//    _args.push_back(argv[i]);
//  }
//  _cl = std::make_shared<GetPot>(argc, argv);
//}
//
//CommandLine::~CommandLine() {}